<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .map {
      width: 800px;
      height: 600px;
      background: #ccc;
      position: relative;
    }
  </style>
</head>
<body>
  <div class="map"></div>
  <script src="./food.js"></script>
  <script src="./snake.js"></script>
  <script src="./game.js"></script>
  <script>

    //地图
    var map = document.querySelector('.map');
    //初始化游戏
    var gm = new Game(map);
    gm.init();
    // //食物
    // var fd = new Food(20,20,'pink');
    // fd.init(map);
    // //蛇
    // var snake = new Snake();
    // snake.init(map);
    // // snake.move(fd,map);
    // // snake.init(map);
    
    // setInterval(function () {
    //   snake.move(fd,map);
    // snake.init(map);
    // }, 150);
  </script>
</body>
</html>